package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.INavDao;
import com.cn.wanxi.dao.impl.NavDaoImpl;
import com.cn.wanxi.model.NavModel;
import com.cn.wanxi.service.INavService;

import java.util.List;

public class NavServiceImpl implements INavService {
    INavDao navDao = new NavDaoImpl();
    @Override
    public int addNav(NavModel navModel) {
        return navDao.addNav(navModel);
    }

    @Override
    public int deleteNav(int id) {
        return navDao.deleteNav(id);
    }

    @Override
    public int editNav(NavModel navModel) {
        return navDao.editNav(navModel);
    }

    @Override
    public List<NavModel> getNavList() {
        return navDao.getNavList();
    }

    @Override
    public NavModel getNav(int id) {
        return navDao.getNav(id);
    }

    @Override
    public List<NavModel> getNavList(int page, int size) {
        return navDao.getNavList(page,size);
    }

    @Override
    public List<NavModel> getNavList(int page, int size, String sort) {
        return navDao.getNavList(page, size, sort);
    }

    @Override
    public List<NavModel> searchNav(String sql) {
        return navDao.searchNav(sql);
    }

    @Override
    public long getNavCount() {
        return navDao.getNavCount();
    }
}
